﻿<%@ Page Title="Cungmuanao.com - Cập nhật Profile" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true" CodeFile="EditProfile.aspx.cs" Inherits="Admin_EditProfile" %>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" Runat="Server">

<div class="title">Thay đổi Password</div>
<div class="body">
<ul style="list-style-type: square">
   <li>
        <asp:HyperLink ID="hplManageUser" runat="server" Text="Manage User" NavigateUrl="~/Admin/ManageUser.aspx"></asp:HyperLink>
    </li>
</ul>  
<hr /> 
<p></p>

    <!-- Bat Dau -->
      <asp:ChangePassword ID="ChangePassword1" runat="server">
        <ChangePasswordTemplate>
             <table cellpadding="2">
                 <tr>
                    <td style="width: 110px;" class="fieldname">
                        <asp:Label runat="server" ID="lblCurrentPassword" AssociatedControlID="CurrentPassword" Text="Current password:" />
                    </td>
                   <td style="width: 300px;">
                        <asp:TextBox ID="CurrentPassword" TextMode="Password" runat="server" Width="100%">
                        </asp:TextBox>
                   </td>
                   <td>
                      <asp:RequiredFieldValidator ID="valRequireCurrentPassword" runat="server" ControlToValidate="CurrentPassword" SetFocusOnError="true" Display="Dynamic"
                         ErrorMessage="Password is required." ToolTip="Password is required." ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
                   </td>            
                </tr>
                 <tr>
                    <td class="fieldname">
                        <asp:Label runat="server" ID="lblNewPassword" AssociatedControlID="NewPassword" Text="New password:" />
                    </td>
                    <td>
                        <asp:TextBox ID="NewPassword" TextMode="Password" runat="server" Width="100%"></asp:TextBox>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="valRequireNewPassword" runat="server" ControlToValidate="NewPassword" SetFocusOnError="true" Display="Dynamic"
                        ErrorMessage="New Password is required." ToolTip="New Password is required." ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
                        <asp:RegularExpressionValidator ID="valPasswordLength" runat="server" ControlToValidate="NewPassword" SetFocusOnError="true" Display="Dynamic"
                                ValidationExpression="\w{5,}" ErrorMessage="New Password must be at least 5 characters long." ToolTip="New Password must be at least 5 characters long."
                                ValidationGroup="ChangePassword1">*</asp:RegularExpressionValidator>
                    </td>            
                </tr>
                 <tr>
                    <td class="fieldname">
                        <asp:Label runat="server" ID="lblConfirmPassword" AssociatedControlID="ConfirmNewPassword" Text="Confirm password:" />
                    </td>
                    <td>
                        <asp:TextBox ID="ConfirmNewPassword" TextMode="Password" runat="server" Width="100%"/>
                    </td>
                    <td>
                        <asp:RequiredFieldValidator ID="valRequireConfirmNewPassword" runat="server" ControlToValidate="ConfirmNewPassword" SetFocusOnError="true" Display="Dynamic"
                            ErrorMessage="Confirm Password is required." ToolTip="Confirm Password is required."
                            ValidationGroup="ChangePassword1">*</asp:RequiredFieldValidator>
                        <asp:CompareValidator ID="valComparePasswords" runat="server" ControlToCompare="NewPassword"
                            ControlToValidate="ConfirmNewPassword" SetFocusOnError="true" Display="Dynamic" ErrorMessage="The Confirm Password must match the New Password entry."
                            ValidationGroup="ChangePassword1">*</asp:CompareValidator>
                    </td>            
                 </tr>
                 <td colspan="3" style="text-align: right;">
               <asp:Label ID="FailureText" runat="server" SkinID="FeedbackKO" EnableViewState="False" /> 
               <asp:Button ID="ChangePasswordPushButton" runat="server" CommandName="ChangePassword"
                  Text="Change Password" ValidationGroup="ChangePassword1" />
            </td>
             </table>
             <asp:ValidationSummary runat="server" ID="valChangePasswordSummary" ValidationGroup="ChangePassword1" ShowMessageBox="true" ShowSummary="false" />
        </ChangePasswordTemplate>
        <SuccessTemplate>
            <asp:Label runat="server" ID="lblSuccess" SkinID="FeedbackOK" 
            Text="Your password has been changed successfully." />
        </SuccessTemplate>
        <MailDefinition BodyFileName="~/Admin/ChangePasswordMail.txt" 
        From="admin@cungmuanao.com"
            Subject="cungmuanao.com : password changed">
         </MailDefinition>
      </asp:ChangePassword>   
        
        <!-- /Bat Dau --> 
</div>
<div class="bottom"></div>
</asp:Content>